
money=50000
name=input("请输入客户名字:")

def queryResidue():
    print(name,"余额为:",money)

def saveMoney():
    num=float(input("请输入存钱金额:"))
    global money
    money+=num
    print(f"存钱成功,{name}余额为:",money)

def drawMoney():
    num=float(input("请输入取钱金额："))
    global money
    if num>money:
        print("余额不足")
    else:
        money-=num
        print(f"取钱成功,{name}余额为:",money)

def mainMenu():
    print("************************************")
    print("*      1.查询余额                  *")
    print("*      2.存钱                      *")
    print("*      3.取钱                      *")
    print("*      4.退出                      *")
    print("************************************")
    choice=int(input("请输入选项:"))
    if choice==1:
        queryResidue()
    elif choice==2:
        saveMoney()
    elif choice==3:
        drawMoney()
    else:
        print("谢谢使用")
        return "exit"


while True:
    result=mainMenu()
    if result=="exit":
        break